From: Andrew Cooper Date: Wed, 26 Mar 2014 14:36:13 +0000 (+0100) Subject: x86: identify which vcpu's CR4 is being badly modified X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5342 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=29f7ec2a9231352de05523e88619e9cef9ed695c;p=xen.git x86: identify which vcpu's CR4 is being badly modified When the toolstack is setting vcpu state on behalf of a migrating guest, the domain/vcpu reference from gdprintk() identifies the toolstack, not the affected domain. After this change, the error looks more like: (XEN) d0 attempted to change d6v0's CR4 flags 00002660 -> 01876000 Signed-off-by: Andrew Cooper --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index b48f2dce79..796b7752c4 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -651,9 +651,9 @@ unsigned long pv_guest_cr4_fixup(const struct vcpu *v, unsigned long guest_cr4) hv_cr4_mask &= ~X86_CR4_OSXSAVE; if ( (guest_cr4 & hv_cr4_mask) != (hv_cr4 & hv_cr4_mask) ) - gdprintk(XENLOG_WARNING, - "Attempt to change CR4 flags %08lx -> %08lx\n", - hv_cr4, guest_cr4); + printk(XENLOG_G_WARNING + "d%d attempted to change %pv's CR4 flags %08lx -> %08lx\n", + current->domain->domain_id, v, hv_cr4, guest_cr4); return (hv_cr4 & hv_cr4_mask) | (guest_cr4 & ~hv_cr4_mask); }